<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 栏目管理 基类
 * @Entity
 * @Table(name="fa_cate", id={"id"})
 * @DDL("CREATE TABLE `fa_cate` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('channel','page','link','list') DEFAULT NULL COMMENT '类型',
  `model_id` int(10) unsigned DEFAULT '0' COMMENT '模型ID',
  `parent_id` int(10) unsigned DEFAULT '0' COMMENT '父ID',
  `name` varchar(30) DEFAULT '' COMMENT '栏目名称',
  `image` varchar(100) DEFAULT '' COMMENT '图片',
  `flag` varchar(100) DEFAULT '' COMMENT '标志',
  `seotitle` varchar(255) DEFAULT '' COMMENT 'SEO标题',
  `keywords` varchar(255) DEFAULT '' COMMENT '关键字',
  `description` varchar(255) DEFAULT '' COMMENT '描述',
  `outlink` varchar(255) DEFAULT '' COMMENT '链接',
  `items` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '文章数量',
  `weigh` int(10) DEFAULT NULL,
  `tpl` varchar(100) DEFAULT '' COMMENT '栏目页模板',
  `listtpl` varchar(100) DEFAULT '' COMMENT '列表页模板',
  `showtpl` varchar(100) DEFAULT '' COMMENT '详情页模板',
  `pagesize` smallint(5) NOT NULL DEFAULT '10' COMMENT '分页大小',
  `isnav_switch` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否导航显示',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  `status` enum('1','2') DEFAULT '1' COMMENT '状态:1=正常,2=隐藏',
  `diyname` varchar(100) DEFAULT NULL COMMENT '自定义名称',
  `table_name` varchar(255) DEFAULT NULL COMMENT '数据库表名',
  PRIMARY KEY (`id`),
  KEY `weigh` (`weigh`,`id`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='栏目管理'")
 * @property int $id 
 * @property string $type 类型
 * @property int $modelId 模型ID
 * @property int $parentId 父ID
 * @property string $name 栏目名称
 * @property string $image 图片
 * @property string $flag 标志
 * @property string $seotitle SEO标题
 * @property string $keywords 关键字
 * @property string $description 描述
 * @property string $outlink 链接
 * @property int $items 文章数量
 * @property int $weigh 
 * @property string $tpl 栏目页模板
 * @property string $listtpl 列表页模板
 * @property string $showtpl 详情页模板
 * @property int $pagesize 分页大小
 * @property int $isnavSwitch 是否导航显示
 * @property int $createtime 创建时间
 * @property int $updatetime 更新时间
 * @property string $status 状态:1=正常,2=隐藏
 * @property string $diyname 自定义名称
 * @property string $tableName 数据库表名
 */
abstract class CateBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 类型
     * type
     * @Column(name="type", type="enum", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - 类型
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - 类型
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * 模型ID
     * model_id
     * @Column(name="model_id", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $modelId;

    /**
     * 获取 modelId - 模型ID
     *
     * @return int
     */ 
    public function getModelId()
    {
        return $this->modelId;
    }

    /**
     * 赋值 modelId - 模型ID
     * @param int $modelId model_id
     * @return static
     */ 
    public function setModelId($modelId)
    {
        $this->modelId = $modelId;
        return $this;
    }

    /**
     * 父ID
     * parent_id
     * @Column(name="parent_id", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $parentId;

    /**
     * 获取 parentId - 父ID
     *
     * @return int
     */ 
    public function getParentId()
    {
        return $this->parentId;
    }

    /**
     * 赋值 parentId - 父ID
     * @param int $parentId parent_id
     * @return static
     */ 
    public function setParentId($parentId)
    {
        $this->parentId = $parentId;
        return $this;
    }

    /**
     * 栏目名称
     * name
     * @Column(name="name", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 栏目名称
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 栏目名称
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 图片
     * image
     * @Column(name="image", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 图片
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 图片
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 标志
     * flag
     * @Column(name="flag", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $flag;

    /**
     * 获取 flag - 标志
     *
     * @return string
     */ 
    public function getFlag()
    {
        return $this->flag;
    }

    /**
     * 赋值 flag - 标志
     * @param string $flag flag
     * @return static
     */ 
    public function setFlag($flag)
    {
        $this->flag = $flag;
        return $this;
    }

    /**
     * SEO标题
     * seotitle
     * @Column(name="seotitle", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $seotitle;

    /**
     * 获取 seotitle - SEO标题
     *
     * @return string
     */ 
    public function getSeotitle()
    {
        return $this->seotitle;
    }

    /**
     * 赋值 seotitle - SEO标题
     * @param string $seotitle seotitle
     * @return static
     */ 
    public function setSeotitle($seotitle)
    {
        $this->seotitle = $seotitle;
        return $this;
    }

    /**
     * 关键字
     * keywords
     * @Column(name="keywords", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $keywords;

    /**
     * 获取 keywords - 关键字
     *
     * @return string
     */ 
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * 赋值 keywords - 关键字
     * @param string $keywords keywords
     * @return static
     */ 
    public function setKeywords($keywords)
    {
        $this->keywords = $keywords;
        return $this;
    }

    /**
     * 描述
     * description
     * @Column(name="description", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $description;

    /**
     * 获取 description - 描述
     *
     * @return string
     */ 
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * 赋值 description - 描述
     * @param string $description description
     * @return static
     */ 
    public function setDescription($description)
    {
        $this->description = $description;
        return $this;
    }

    /**
     * 链接
     * outlink
     * @Column(name="outlink", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $outlink;

    /**
     * 获取 outlink - 链接
     *
     * @return string
     */ 
    public function getOutlink()
    {
        return $this->outlink;
    }

    /**
     * 赋值 outlink - 链接
     * @param string $outlink outlink
     * @return static
     */ 
    public function setOutlink($outlink)
    {
        $this->outlink = $outlink;
        return $this;
    }

    /**
     * 文章数量
     * items
     * @Column(name="items", type="mediumint", length=8, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $items;

    /**
     * 获取 items - 文章数量
     *
     * @return int
     */ 
    public function getItems()
    {
        return $this->items;
    }

    /**
     * 赋值 items - 文章数量
     * @param int $items items
     * @return static
     */ 
    public function setItems($items)
    {
        $this->items = $items;
        return $this;
    }

    /**
     * weigh
     * @Column(name="weigh", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $weigh;

    /**
     * 获取 weigh
     *
     * @return int
     */ 
    public function getWeigh()
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh
     * @param int $weigh weigh
     * @return static
     */ 
    public function setWeigh($weigh)
    {
        $this->weigh = $weigh;
        return $this;
    }

    /**
     * 栏目页模板
     * tpl
     * @Column(name="tpl", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $tpl;

    /**
     * 获取 tpl - 栏目页模板
     *
     * @return string
     */ 
    public function getTpl()
    {
        return $this->tpl;
    }

    /**
     * 赋值 tpl - 栏目页模板
     * @param string $tpl tpl
     * @return static
     */ 
    public function setTpl($tpl)
    {
        $this->tpl = $tpl;
        return $this;
    }

    /**
     * 列表页模板
     * listtpl
     * @Column(name="listtpl", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $listtpl;

    /**
     * 获取 listtpl - 列表页模板
     *
     * @return string
     */ 
    public function getListtpl()
    {
        return $this->listtpl;
    }

    /**
     * 赋值 listtpl - 列表页模板
     * @param string $listtpl listtpl
     * @return static
     */ 
    public function setListtpl($listtpl)
    {
        $this->listtpl = $listtpl;
        return $this;
    }

    /**
     * 详情页模板
     * showtpl
     * @Column(name="showtpl", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $showtpl;

    /**
     * 获取 showtpl - 详情页模板
     *
     * @return string
     */ 
    public function getShowtpl()
    {
        return $this->showtpl;
    }

    /**
     * 赋值 showtpl - 详情页模板
     * @param string $showtpl showtpl
     * @return static
     */ 
    public function setShowtpl($showtpl)
    {
        $this->showtpl = $showtpl;
        return $this;
    }

    /**
     * 分页大小
     * pagesize
     * @Column(name="pagesize", type="smallint", length=5, accuracy=0, nullable=false, default="10", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $pagesize;

    /**
     * 获取 pagesize - 分页大小
     *
     * @return int
     */ 
    public function getPagesize()
    {
        return $this->pagesize;
    }

    /**
     * 赋值 pagesize - 分页大小
     * @param int $pagesize pagesize
     * @return static
     */ 
    public function setPagesize($pagesize)
    {
        $this->pagesize = $pagesize;
        return $this;
    }

    /**
     * 是否导航显示
     * isnav_switch
     * @Column(name="isnav_switch", type="tinyint", length=1, accuracy=0, nullable=false, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $isnavSwitch;

    /**
     * 获取 isnavSwitch - 是否导航显示
     *
     * @return int
     */ 
    public function getIsnavSwitch()
    {
        return $this->isnavSwitch;
    }

    /**
     * 赋值 isnavSwitch - 是否导航显示
     * @param int $isnavSwitch isnav_switch
     * @return static
     */ 
    public function setIsnavSwitch($isnavSwitch)
    {
        $this->isnavSwitch = $isnavSwitch;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 状态:1=正常,2=隐藏
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态:1=正常,2=隐藏
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态:1=正常,2=隐藏
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

    /**
     * 自定义名称
     * diyname
     * @Column(name="diyname", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $diyname;

    /**
     * 获取 diyname - 自定义名称
     *
     * @return string
     */ 
    public function getDiyname()
    {
        return $this->diyname;
    }

    /**
     * 赋值 diyname - 自定义名称
     * @param string $diyname diyname
     * @return static
     */ 
    public function setDiyname($diyname)
    {
        $this->diyname = $diyname;
        return $this;
    }

    /**
     * 数据库表名
     * table_name
     * @Column(name="table_name", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $tableName;

    /**
     * 获取 tableName - 数据库表名
     *
     * @return string
     */ 
    public function getTableName()
    {
        return $this->tableName;
    }

    /**
     * 赋值 tableName - 数据库表名
     * @param string $tableName table_name
     * @return static
     */ 
    public function setTableName($tableName)
    {
        $this->tableName = $tableName;
        return $this;
    }

}
